<template>
  <view
    id="main"
    ref="main"
    @click="popup"
  >
    <slot />
    <view
      v-if="showPopup"
      class="x-position-absolute"
      style="z-index: 999"
      :style="[contentStyle]"
    >
      <slot name="content" />
    </view>
  </view>		
</template>

<script>
  import { getComponentSize } from '@/uni_modules/xone/utils/utils.js'
  export default {
    props: {
      
    },
    data() {
      return {
        showPopup: false,
        size: {},
      }
    },
    computed: {
      contentStyle() {
        return {

        }
      }
    },
    methods: {				
      popup() {
        getComponentSize('main', this).then(size=>{
          this.size = size
          this.showPopup = true
        })
      }
    }
  }
</script>

<style>
</style>